class Stack:
    def __init__(self, id):
        self.id = id
        self.data = []

    def Push(self, value):
        self.data.append(value)

    def Get(self):
        if self.Available():
            return self.data.pop(0)
        else:
            return None

    def Available(self):
        return len(self.data) > 0

class StackPool:
    def __new__(cls):
        if not hasattr(cls, 'instance'):
            cls.instance = super(StackPool, cls).__new__(cls)
        return cls.instance

    def __init__(self):
        self.stacks = []

    def New(self):
        id = len(self.stacks)
        stack = Stack(id)
        self.stacks.append(stack)
        return id

    def AccessStack(self, id):
        return self.stacks[id]
